package com.czkt.springboot_mybatis_test.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.springboot_mybatis_test.entity.Product;
import com.czkt.springboot_mybatis_test.mapper.ProductMapper;
import com.czkt.springboot_mybatis_test.service.IProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {
    @Resource
    ProductMapper productMapper;

    @Override
    public Integer selectProductCount(String prodName, String prodType, String prodBatch) {
        return productMapper.selectProductCount(prodName, prodType, prodBatch);
    }

    @Override
    public List<Product> selectProduct(String prodName, String prodType, String prodBatch, Integer pageIndex, Integer pageSize) {
        return productMapper.selectProduct(prodName, prodType, prodBatch, pageIndex, pageSize);
    }
}
